package com.smooth.dao.gen;

import com.smooth.dao.gen.bean.WxProvince;
import com.smooth.dao.gen.bean.WxProvinceExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WxProvinceMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @SelectProvider(type=WxProvinceSqlProvider.class, method="countByExample")
    long countByExample(WxProvinceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @DeleteProvider(type=WxProvinceSqlProvider.class, method="deleteByExample")
    int deleteByExample(WxProvinceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @Delete({
        "delete from wx_province",
        "where id = #{id,jdbcType=SMALLINT}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @Insert({
        "insert into wx_province (id, upid, ",
        "name, level, hit)",
        "values (#{id,jdbcType=SMALLINT}, #{upid,jdbcType=SMALLINT}, ",
        "#{name,jdbcType=VARCHAR}, #{level,jdbcType=SMALLINT}, #{hit,jdbcType=INTEGER})"
    })
    int insert(WxProvince record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @InsertProvider(type=WxProvinceSqlProvider.class, method="insertSelective")
    int insertSelective(WxProvince record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @SelectProvider(type=WxProvinceSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.SMALLINT, id=true),
        @Result(column="upid", property="upid", jdbcType=JdbcType.SMALLINT),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="level", property="level", jdbcType=JdbcType.SMALLINT),
        @Result(column="hit", property="hit", jdbcType=JdbcType.INTEGER)
    })
    List<WxProvince> selectByExample(WxProvinceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @Select({
        "select",
        "id, upid, name, level, hit",
        "from wx_province",
        "where id = #{id,jdbcType=SMALLINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.SMALLINT, id=true),
        @Result(column="upid", property="upid", jdbcType=JdbcType.SMALLINT),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="level", property="level", jdbcType=JdbcType.SMALLINT),
        @Result(column="hit", property="hit", jdbcType=JdbcType.INTEGER)
    })
    WxProvince selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @UpdateProvider(type=WxProvinceSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WxProvince record, @Param("example") WxProvinceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @UpdateProvider(type=WxProvinceSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WxProvince record, @Param("example") WxProvinceExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @UpdateProvider(type=WxProvinceSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WxProvince record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wx_province
     */
    @Update({
        "update wx_province",
        "set upid = #{upid,jdbcType=SMALLINT},",
          "name = #{name,jdbcType=VARCHAR},",
          "level = #{level,jdbcType=SMALLINT},",
          "hit = #{hit,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=SMALLINT}"
    })
    int updateByPrimaryKey(WxProvince record);
}